gdkgl: Remove flipping when downloading GL texture
authorTimm Bäder <mail@baedert.org>
Sat, 3 Oct 2020 09:48:36 +0000 (11:48 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 14 Oct 2020 19:06:12 +0000 (15:06 -0400)
This fix is correct and fixes:

  1) GL textures being upside down in the inspector. They are getting
     downloaded because they've been created in a different GL context
  2) GL textures being upside down in the cairo renderer (same reason)

However, it breaks the testsuite. We do the flipping via the projection
matrix, but most of the shaders don't care about that.

gdk/gdkgl.c

index 00b0272c8c9beea2d17edbc8419ecd452613adfe..56dce183332c45e6b23d0db2d0fba602c18086bf 100644 (file)
@@ -419,10 +419,6 @@ gdk_cairo_draw_from_gl (cairo_t              *cr,
 
   cairo_surface_mark_dirty (image);
 
-  /* Invert due to opengl having different origin */
-  cairo_scale (cr, 1, -1);
-  cairo_translate (cr, 0, -height / buffer_scale);
-
   cairo_set_source_surface (cr, image, 0, 0);
   cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
   cairo_paint (cr);